export interface ProductType {
  apiVersion: string;
  kind: string;
  metadata: {
    name: string;
    generateName?: string;
    creationTimestamp?: string;
    deletionTimestamp?: string;
    labels?: Record<string, string>;
    annotations?: Record<string, string>;
  };
  spec: {
    displayName: string;
    description?: string;
    images?: string[];
    priority: number;
  };
  status?: {
    productCount?: number;
    observedVersion?: number;
  };
}

export interface Product {
  apiVersion: string;
  kind: string;
  metadata: {
    name: string;
    generateName?: string;
    creationTimestamp?: string;
    deletionTimestamp?: string;
    labels?: Record<string, string>;
    annotations?: Record<string, string>;
  };
  spec: {
    displayName: string;
    productTypeRef: string;
    description?: string;
    images?: string[];
    price?: number;
    samplePrice?: number;
    minOrderQuantity?: number;
    priority: number;
    published: boolean;
  };
  status?: {
    permalink?: string;
    observedVersion?: number;
    productTypeName?: string;
  };
}

export interface ProductTypeListResponse {
  items: ProductType[];
  total: number;
  page: number;
  size: number;
}

export interface ProductListResponse {
  items: Product[];
  total: number;
  page: number;
  size: number;
}

export interface ProductTypeListRequest {
  page: number;
  size: number;
  keyword?: string;
}

export interface ProductListRequest {
  page: number;
  size: number;
  keyword?: string;
  productTypeRef?: string;
}

export interface CreateProductTypeRequest {
  productType: ProductType;
}

export interface UpdateProductTypeRequest {
  name: string;
  productType: ProductType;
}

export interface DeleteProductTypeRequest {
  name: string;
}

export interface CreateProductRequest {
  product: Product;
}

export interface UpdateProductRequest {
  name: string;
  product: Product;
}

export interface DeleteProductRequest {
  name: string;
}